package br.com.sbc.managedBean;


import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;

import br.com.sbc.util.SBCconstantes;


public class BaseManagedBean {
	
	protected void addMessageInfo(String summary) {  
		FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, summary,  null));  
    }  
  
    protected void addMessageWarn(String summary) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_WARN, summary, null));  
    }  
  
    protected void addMessageError(String summary) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, summary, null));  
    }  
  
    protected void addMessageFatal(String summary) {  
        FacesContext.getCurrentInstance().addMessage(null, new FacesMessage(FacesMessage.SEVERITY_FATAL, summary, null));  
    }
	
	public String paginaInicial(){
		return SBCconstantes.PAGINA_HOME;
	}

}
